﻿@model IEnumerable<RSSReader.WebClient.Models.FeedArticle>

@foreach (var feedArticle in Model)
{
  <div class="FeedArticle @(feedArticle.HaveBeenRed ? "FeedArticleIsRed" : "")">
    <div style="height:100px;" class="FeedHeaderContainer">
      <div title="Favoris" onclick="ToggleFavorite(this);" class="FeedFavoriteButton ButtomLeftRadius @(feedArticle.IsFavorite ? "FeedIsFavorite" : "")">
        &nbsp;
      </div>
      <div title="Lire" class="FeedHeader" onclick="ToggleArticle(this, '@feedArticle.Link');">
        <div>
          <div class="FeedTitle">
            @(new HtmlString(feedArticle.Title))
          </div>
          <div class="FeedAdditionalInformation">
            <div class="FeedSource">
              @feedArticle.SourceName
            </div>
            <div class="FeedDate">
              @(feedArticle.PublicationDate.HasValue ? feedArticle.PublicationDate.Value.ToString() : "")
            </div>
          </div>
        </div>
        <input type="hidden" class="FeedArticleSourceLink" value="@feedArticle.SourceLink" />
        <div class="FeedSummary">
          <a class="FeedArticleLink" href="@feedArticle.Link" target="_blank" onclick="SetArticleInfo(this, event);">Voir l'article</a>
        </div>
      </div>
    </div>
    <div class="FeedContent">
      <div style="text-align:center;overflow:auto;">
        @(new HtmlString(feedArticle.Description))
      </div>
    </div>
  </div>
}
